# -*- encoding: utf-8 -*-
"""
File Name: load_cmdb_info
Description:
Author : 'lirui'
date: 2024/1/31
Contact: marjey_lee@163.com
Change Activity:
2024/1/31:
"""
from modules.blk.cmdb.common.cmdb_api import CMDBAPI


def load_dedicated_info_from_cmdb():
    """

    Returns:

    """
    api = CMDBAPI()
    res = api.select_all('dedicated_line')
    data = res['data']['info']
    filter_data = []
    for item in data:
        if item['in_use'] == '在用':
            filter_data.append(item)
    assert len(data) > 0
    return filter_data
